package de.tuhh.simsearch.dto;

import java.io.Serializable;
import java.util.Set;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * GroupDTO is the data transfer object for groups.  
 * 
 * @author SimSearch 1
 *
 */
@XmlRootElement(name = "group")
public class GroupDTO implements Serializable {

  private static final long serialVersionUID = -8160475028099693302L;

  private String name;

  private String grpAdmin;

  private Set<String> users;

  private Set<String> pendingUsers;

  /**
   * The default constructor
   */
  public GroupDTO() {

  }

  /**
   * The constructor which sets name and group admin
   * 
   * @param name the name of the group
   * @param admin the group admin's name
   */
  public GroupDTO(String name, String admin) {

    this.name = name;
    this.grpAdmin = admin;
  }

  /**
   * Gets the name of the group
   * @return the name of the group
   */
  public String getName() {

    return name;
  }

  /**
   * Sets the name of the group
   * @param name the name of the group
   */
  public void setName(String name) {

    this.name = name;
  }

  /**
   * Gets the name of the group administrator
   * @return the name of the group administrator
   */
  public String getGrpAdmin() {

    return grpAdmin;
  }

  /**
   * Sets the name of the group administrator
   * @param admin the name of the group administrator
   */
  public void setGrpAdmin(String admin) {

    this.grpAdmin = admin;
  }

  /**
   * Gets the set of names of members of this group
   * @return the set of member's names
   */
  public Set<String> getUsers() {

    return users;
  }

  /**
   * Sets the set of members of this group
   * @param users the set of member's names to be set as group members
   */
  public void setUsers(Set<String> users) {

    this.users = users;
  }

  /**
   * Gets the set of pending user's names
   * @return the set of pending user's names
   */
  public Set<String> getPendingUsers() {

    return pendingUsers;
  }

  /**
   * Sets a set as the new set of pending users of this group
   * @param pendingUsers the set of member's names to set
   */
  public void setPendingUsers(Set<String> pendingUsers) {

    this.pendingUsers = pendingUsers;
  }

}
